import React from "react";
import {List, Form, Input, Button, Checkbox} from 'antd';
const Index: React.FC = () => {
  const data = [{name: '版本编号', code: 'a', val: ''},{name: '条形码', code: 'b', val: ''},
    {name: '病人类型', code: 'c', val: ''},{name: '病人号', code: 'brh', val: ''},
    {name: '姓名', code: 'a', val: ''},{name: '性别', code: 'xb', val: ''},
    {name: '年龄', code: 'a', val: ''},{name: '申请料型', code: 'a', val: ''},
    {name: '病区', code: 'a', val: ''},{name: '床号', code: 'a', val: ''},
    {name: '标本类型', code: 'a', val: ''},{name: '伍床诊断', code: 'a', val: ''},
    {name: '送检目的', code: 'a', val: ''},{name: '申请医生', code: 'a', val: ''},
    {name: '申请时司', code: 'a', val: ''},{name: '采样时司', code: 'a', val: ''},
    {name: '接收时司', code: 'a', val: ''},{name: '检验医生', code: 'a', val: ''},
    {name: '审核时间', code: 'a', val: ''},{name: '审核医生', code: 'a', val: ''},
    {name: '审核标志', code: 'a', val: ''},{name: '报告备注', code: 'a', val: ''},
    {name: '结果提示', code: 'a', val: ''},{name: '仪品诊断', code: 'a', val: ''},
    {name: '报告时可', code: 'a', val: ''},{name: '录入时间', code: 'a', val: ''},
    {name: '联系电话', code: 'a', val: ''},{name: '收费类别', code: 'a', val: ''},
    {name: '送检单位', code: 'a', val: ''},
    ]
  const onFinish: any['onFinish'] = (values) => {
    console.log('Success:', values);
  };

  const onFinishFailed: any['onFinishFailed'] = (errorInfo) => {
    console.log('Failed:', errorInfo);
  };
  return (<div style={{overflow: 'auto'}}>
    <List
      size="small"
      header={null}
      footer={null}
      bordered
      dataSource={data}
      renderItem={(item) => <List.Item>
        <div style={{display: 'flex'}}>
          <div style={{minWidth: '70px',lineHeight: '32px',whiteSpace: 'nowrap',
            overflow: 'hidden',
            textOverflow: 'ellipsis'}}>{item.name}:</div>
          <Input value={item.val}/>
          { item.code === 'brh' ? <Button type="primary" style={{marginLeft: '6px'}}>读卡</Button> : null}
          { item.code === 'xb' ? <div style={{lineHeight: '32px',color: 'red'}}><Checkbox style={{width: '60px'}}>加急</Checkbox></div> : null}
        </div>
      </List.Item>}
    />
    </div>)
}

export default Index;
